package com.scalar.chiptrack.operations.dataentry.forms;

import java.util.ArrayList;
import java.util.Iterator;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionMapping;

import com.scalar.chiptrack.ChipTrackActionForm;
import com.scalar.chiptrack.operations.dataentry.DieBankBinningInfoWafer;

/**
 * User: Murali Krishna Yengala
 * Date: Jul 22, 2005
 * Time: 5:57:37 PM
 */
public class DieBankBinningInfoForm extends ChipTrackActionForm{

    String processStepId = null;
    String locationId = null;
    String lotId = null;
    int goodBinsCount = -1;
    ArrayList wafers = null;
    String action = null;
    int grossDie = 0;


    public String getProcessStepId() {
        return processStepId;
    }

    public void setProcessStepId(String processStepId) {
        this.processStepId = processStepId;
    }

    public String getLocationId() {
        return locationId;
    }

    public void setLocationId(String locationId) {
        this.locationId = locationId;
    }

    public String getLotId() {
        return lotId;
    }

    public void setLotId(String lotId) {
        this.lotId = lotId;
    }

    public int getGoodBinsCount() {
        return goodBinsCount;
    }

    public void setGoodBinsCount(int goodBinsCount) {
        this.goodBinsCount = goodBinsCount;
    }

    public ArrayList getWafers() {
        return wafers;
    }

    public void setWafers(ArrayList wafers) {
        this.wafers = wafers;
    }

    public String getAction() {
        return action;
    }

    public void setAction(String action) {
        this.action = action;
    }

    public int getGrossDie() {
        return grossDie;
    }

    public void setGrossDie(int grossDie) {
        this.grossDie = grossDie;
    }

    public void reset( ActionMapping mapping , HttpServletRequest request )
    {
        if( getWafers() != null )
        {
            Iterator wafersIte = getWafers().iterator();
            while( wafersIte.hasNext() )
            {
                DieBankBinningInfoWafer dieBankBinningInfoWafer = (DieBankBinningInfoWafer) wafersIte.next();
                dieBankBinningInfoWafer.setHold( false);
            }

        }
    }
}
